<template>
    <div>
        {{ test }}
    </div>
</template>
<script setup lang="ts">

//第一种写法
import { computed, ComputedRef } from "vue"
const test = computed<number>((): number => {
    return 8
})

//第二种写法
const test2: ComputedRef<number> = computed(() => {
    return 8
})
</script>

<style scoped></style>